package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    /**
     * 查询数据库中是否存有该数据
     * @param shoppingCart
     * @return
     */
    List<ShoppingCart> selectShoppingCart(ShoppingCart shoppingCart);

     /**
     * 将数据库已存在的数据number更新
     * @param sc
     */
    void update(ShoppingCart sc);

    /**
     * 添加购物车
     * @param shoppingCart
     * @return
     */
    void insertShoppingCart(ShoppingCart shoppingCart);

    /**
     * 删除购物车中的商品
     * @param shoppingCart
     * @return
     */
    void delete(ShoppingCart shoppingCart);
}
